
cc.Class({
    extends: cc.Component,

    properties: {
      
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        this.role = this.node.parent.getComponent('role');
        //this.hp = this.role.hp;
    },

    onCollisionEnter:function(other,self){
        if (other.node.group =='enemy' && other.tag == 2) {
            this.role.isHurt();
        }
    },

    // start () {

    // },

    // update (dt) {},
});
